package com.cdd.agent.api.service;

import com.cdd.agent.api.domain.dto.*;
import com.cdd.agent.api.domain.vo.*;
import com.cdd.agent.api.mapper.*;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author cdd
 * @date 2025-08-08 10:10
 */
@Service
public class AgentUserCountService {

    @Resource
    private AppUserMapper appUserMapper;

    @Resource
    private AppCashWithdrawalMapper cashWithdrawalMapper;

    @Resource
    private AgentUserMapper agentUserMapper;

    @Resource
    private AgentUserMoneyRecordMapper userMoneyRecordMapper;

    @Resource
    private AppMingxiChongzhiMapper mingxiChongzhiMapper;

    /**
     * @desc 邀请的用户
     */
    public List<AgentUserVo> getAgentUserList(AgentUserDto dto) {
        return appUserMapper.getAgentUserList(dto);
    }

    /**
     * @desc 邀请的主播
     */
    public List<AgentZhuBoVo> getAgentZhuBoList(AgentUserDto dto){
        return appUserMapper.getAgentZhuBoList(dto);
    }

    /**
     * @desc 提现明细
     */
    public List<AgentTxMingxiVo> getAgentTxMingxi(AgentTxMingxiDto dto) {
        return cashWithdrawalMapper.getAgentTxMingxi(dto.getUserId());
    }

    /**
     * @desc 提现统计
     */
    public AgentTxMingxiCountDto getAgentTxMingxiCount(AgentTxMingxiDto dto) {
        return agentUserMapper.getAgentTxMingxiCount(dto);
    }

    /**
     * @desc 收入流水
     */
    public List<AgentIncomeVo> getAgentIncomeList(AgentIncomeDto dto) {
        return userMoneyRecordMapper.getAgentIncomeList(dto);
    }

    public List<MingxiChongzhiVo> getAgentUserCZList(MingxiChongzhiDto dto) {
        return mingxiChongzhiMapper.getAgentUserCZList(dto);
    }
}
